(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
times(x, plus(y, 1)) → plus(times(x, plus(y, times(1, 0))), x)
times(x, 1) → x
plus(x, 0) → x
times(x, 0) → 0
Rewrite Strategy: INNERMOST
(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)
Converted CpxTRS to CDT
(2) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, 1)) → plus(times(z0, plus(z1, times(1, 0))), z0)
times(z0, 1) → z0
times(z0, 0) → 0
plus(z0, 0) → z0
Tuples:
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
S tuples:
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
K tuples:none
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES
Compound Symbols:
c
(3) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)
Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
We considered the (Usable) Rules:
times(z0, 0) → 0
times(z0, plus(z1, 1)) → plus(times(z0, plus(z1, times(1, 0))), z0)
times(z0, 1) → z0
plus(z0, 0) → z0
And the Tuples:
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
The order we found is given by the following interpretation:
Polynomial interpretation :
POL(0) = 0
POL(1) = [4]
POL(PLUS(x1, x2)) = 0
POL(TIMES(x1, x2)) = [4]x2
POL(c(x1, x2, x3, x4)) = x1 + x2 + x3 + x4
POL(plus(x1, x2)) = [3] + [2]x1 + [2]x2
POL(times(x1, x2)) = x2
(4) Obligation:
Complexity Dependency Tuples Problem
Rules:
times(z0, plus(z1, 1)) → plus(times(z0, plus(z1, times(1, 0))), z0)
times(z0, 1) → z0
times(z0, 0) → 0
plus(z0, 0) → z0
Tuples:
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
S tuples:none
K tuples:
TIMES(z0, plus(z1, 1)) → c(PLUS(times(z0, plus(z1, times(1, 0))), z0), TIMES(z0, plus(z1, times(1, 0))), PLUS(z1, times(1, 0)), TIMES(1, 0))
Defined Rule Symbols:
times, plus
Defined Pair Symbols:
TIMES
Compound Symbols:
c
(5) SIsEmptyProof (EQUIVALENT transformation)
The set S is empty
(6) BOUNDS(O(1), O(1))